package com.dragon.graduation.userRole.mapper;

import com.dragon.graduation.userRole.entity.UserRoleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 用户角色表 Mapper 接口
 * </p>
 *
 * @author dragon
 * @since 2025-02-28 21:23:58
 */
@Mapper
public interface UserRoleMapper extends BaseMapper<UserRoleEntity> {

    @Delete("delete from db_user_role where role_id = #{roleId}")
    void deleteByRoleId(Integer roleId);

    void deleteByUserList(List<Integer> userIdList);
}
